﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookie = Request.Cookies["userinfo"];
        if (Request.Cookies["userinfo"] != null)
        {
            if (cookie["username"] != null)
            {
                //HttpCookie myCookie = Request.Cookies["username"];
                cookie.Expires = DateTime.Now.AddDays(-1);
                Response.Cookies.Add(cookie);
                Response.RedirectToRoute("Index");
            }
        }
    }
}